<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>库存盘点明细管理</title>
	<meta name="decorator" content="default"/>
	<style type="text/css">
	</style>
	<script type="text/javascript">
		$(document).ready(function() {
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<form:form id="searchForm" modelAttribute="storeInventoryCheckDetail" action="${ctx}/inventory/storeInventoryCheckDetail/list?sic_id=${inventoryCheck.id}" method="post">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
	</form:form>
	<tags:message content="${message}"/>
	<div class="form-input">
	<label class="middleCls"><h3>库存盘点明细列表</h3></label>
	<table id="contentTable" data-role="table" class="ui-responsive table-stroke">
		<thead>
			<tr><th>产品渠道</th><th>产品分类</th><th>产品名称</th><th>规格</th><th>零售价</th><th>原始库存</th><th>调整后库存</th><th>损失金额</th></tr></thead>
		<tbody>
		<c:forEach items="${page.list}" var="storeInventoryCheckDetail">
			<tr>
				<td>
					${fns:getDictLabel(storeInventoryCheckDetail.storeProduct.product_type, "product_type", "")}
				</td>
				<c:if test="${storeInventoryCheckDetail.storeProduct.product_type == 0}">
					<td>${storeInventoryCheckDetail.storeProduct.product.productCategory.name}</td>
					<td>${storeInventoryCheckDetail.storeProduct.product.name}</td>
					<td>${storeInventoryCheckDetail.storeProduct.product.spec}</td>
					<td>${storeInventoryCheckDetail.storeProduct.product.retail_price}</td>
				</c:if>
				<c:if test="${storeInventoryCheckDetail.storeProduct.product_type == 1}">
					<td>${storeInventoryCheckDetail.storeProduct.storeSelfProduct.storeSelfProductCategory.name}</td>
					<td>${storeInventoryCheckDetail.storeProduct.storeSelfProduct.name}</td>
					<td>${storeInventoryCheckDetail.storeProduct.storeSelfProduct.spec}</td>
					<td>${storeInventoryCheckDetail.storeProduct.storeSelfProduct.retail_price}</td>
				</c:if>
				<td>${storeInventoryCheckDetail.beforeAdjustAmount}</td>
				<td>${storeInventoryCheckDetail.afterAdjustAmount}</td>
				<td>${storeInventoryCheckDetail.lossMoney}</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
		<div class="icon-buttons">
			<a data-role="button" data-inline="true" data-icon="back" data-iconpos="notext"  href="${ctx}/inventory/storeInventoryCheck/list">返回</a>
		</div>
		<div class="pagination">${page}</div>
		<div data-role="collapsible" data-collapsed="false">
		    <h4>备注</h4>
			<p id="remark" style="word-break:break-all">${inventoryCheck.remark}</p>
		</div>
	</div>
</body>
</html>
